$("#btn").click(function () {
    var cname = $("#cname").val();
    var credit = $("#credit").val();
    var capacity = $("#capacity").val();
    var address = $("#address").val();
    $.ajax({
        url:"/RuanJianKeShe/addCourseInfo",
        type:"post",
        data:{
            "msg":"addCourseInfo",
            "cname":cname,
            "credit":credit,
            "capacity": capacity,
            "address":address
        },
        dataType:"json",
        success:function(success){
            alert(success)
        },
        error:function(){
            alert("fail");
        }
    })
    window.history.back();
})

